package com.bb.blog.biz.manage.model;

import com.bb.blog.biz.manage.constant.ManageValidGroup;
import lombok.Data;

import java.util.Date;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * (SysMenu)实体类
 *
 * @author makejava
 * @since 2021-06-30 14:45:54
 */

@Data
@Table(name = "sys_menu")
public class SysMenu implements Serializable {
    private static final long serialVersionUID = 268033105105662164L;

    @Column(name = "id")
    @Id
    @GeneratedValue(generator = "JDBC")
    @NotNull(message = "id不能为null", groups = {ManageValidGroup.MenuEdit.class})
    private Integer id;


    @Column(name = "name")
    @NotBlank(message = "名称不能为空", groups = {ManageValidGroup.MenuAdd.class})
    private String name;

    @Column(name = "code")
    @NotBlank(message = "编码不能为空", groups = {ManageValidGroup.MenuAdd.class})
    private String code;

    @Column(name = "pcode")
    private String pcode;


    @Column(name = "type")
    @NotNull(message = "菜单类型不能为空", groups = {ManageValidGroup.MenuAdd.class})
    private Byte type;

    @Column(name = "system_id")
    @NotNull(message = "菜单系统id不能为空", groups = {ManageValidGroup.MenuAdd.class})
    private String systemId;

    @Column(name = "status")
    private Byte status;


    @Column(name = "visible")
    private Boolean visible;

    @Column(name = "path")
    private String path;

    @Column(name = "icon")
    private String icon;


    @Column(name = "create_time")
    private Date createTime;


}
